<template>
  <div class="container page">

<div style="margin:100rpx;text-align:center">物流单号:{{shippingid}}</div>
<!-- <div>{{this.shippingInfo.list}}</div> -->
<div :key="info" v-for="info of shippingInfo" style="margin:70rpx;">
  <p style="margin:10rpx;">{{info.time}}</p>
  <p style="margin:10rpx;">{{info.status}}</p>
  <p style="margin:70rpx;text-align:center">↑</p>
</div>

  </div>
</template>
<script>
// var WXBizDataCrypt = require('@/tools/WXBizDataCrypt')
import qcloud from 'wafer2-client-sdk'

import {showSuccess, showModal} from '@/util'
import {get, post, getAuth} from '@/util'
// import {get2, post2} from '@/server/api'
import config from '@/config'
export default {

  data () {
    return {
      shippingInfo: {},
      shippingid: '',
      tabA: 0,
      productList: [],
      focus: true,
      inputValue: ''
    }
  },
  mounted () {
    this.userinfo = wx.getStorageSync('userinfo')
  },
  onShareAppMessage() {
    return {
      title: `华人耀酱香型白酒，传承古法工艺，与国酒茅台同宗同源同品。`,
      // imageUrl: 'https://www.rrjiaoyi.com/static/rr-min/share/share.png',
      path: `/pages/hcdindex/main?shareuser=${wx.getStorageSync('user').id}`
    }
  },
  methods: {
    async getShippingInfo(shippingId) {
        return await getAuth(`geweb/shipping/getwuliu?userid=${JSON.parse(wx.getStorageSync('user').id)}&wuliuno=${shippingId}`, {}, {}).then(result => {

        if(result.code === 200) {
            console.log(JSON.parse(result.res).result.list)
            this.shippingInfo = JSON.parse(result.res).result.list
        }
      })

    },
    productChoose (id) {
      // console.log(name, img, userId, accountId)
      wx.navigateTo({
        url: `/pages/product-detail/main?id=${id}`
      })
    },
    async player() {
      return await post('minipro/List', {}, {'api':'all', 'page':1})
    },
    async demo() {
    // return await get2('demo', {})
    },
    async joke() {
      return await get2('api/jokes', {})
    },
    predict () {
      wx.navigateTo({
        url: '/pages/search/main'
      })
    },
    jumpClick (comment) {
      wx.navigateTo({
        // url: '/pages/web-view/main'
        url: '/pages/web-view/main?path=' + 'https://wj.qq.com/s/2491547/f457/'
        // url: '/pages/detail/main'
      })
    }

  },
  onShow () {
    this.shippingid = decodeURIComponent(this.$root.$mp.query.shippingid)
    this.getShippingInfo(this.shippingid)
  }
}
</script>

<style scoped lang='scss'>
.container{
  font-size: 30rpx;
}
page {
  background-color: #ffffff;
  width: 100%;
  height: 100%;
}
</style>
